/*
 * @Author: yangni 920556271@qq.com
 * @Date: 2024-01-15 10:22:13
 * @LastEditors: yangni 920556271@qq.com
 * @LastEditTime: 2024-03-26 09:52:55
 * @FilePath: /yt-devops/lib/model/device_obj/property_group_model.dart
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import 'package:json_annotation/json_annotation.dart';
import 'package:yt_devops/model/device_obj/authority_config_model.dart';
import 'package:yt_devops/model/device_obj/prompt_rule_model.dart';
import 'package:yt_devops/model/device_obj/properties_model.dart';
import 'package:yt_devops/utils/enums.dart';

import 'product_config_model.dart';

part 'property_group_model.g.dart';

@JsonSerializable()
class PropertyGroupModel extends ProductConfigModel<PropertiesModel> {
  PromptRuleModel? promptRule;

  List<AuthorityModelConfig>? authority;

  DeviceModelShowType? showType;

  PropertyGroupModel({
    required super.id,
    String? name,
    super.parentId,
    this.promptRule,
    this.authority,
    this.showType,
  }) : super(type: DeviceConfigType.propertyGroup, name: name);

  factory PropertyGroupModel.fromJson(Map<String, dynamic> json) =>
      _$PropertyGroupModelFromJson(json);

  Map<String, dynamic> toJson() => _$PropertyGroupModelToJson(this);
}
